<template>
  <div>
    电影条目<br>
    <p>{{articles.title}}</p>
    <button @click="test()"></button>
  </div>
</template>
<script>

export default {
  name:'subject',
  data(){
      return{
        articles:[]
      }
  },
   methods:{
    test(){
        
    }
  },
  created(){
    this.$store.commit('changeTitle',{
        title: this.$route.params.subjectTitle,
        state: true,
        footbar:false
      })
  },
  mounted() {
      this.$http.jsonp('https://api.douban.com/v2/movie/subject/'+this.$route.params.subjectId, {}, {
			headers: {},
			emulateJSON: true
		}).then(function(response) {
		// 这里是处理正确的回调

			this.articles = response.data;
			// this.articles = response.data["subjects"] 也可以
		}, function(response) {
			// 这里是处理错误的回调
			console.log(response)
		});
  }
}
</script>

